package com.gable.report.util;

/**
 * Created by gable on 2018/5/7.
 * 政府报表类型 查询医院对应字段工具类
 */
public enum GovernmentTypeEnumUtil {

    Province(4,"province_id"),
    City(5,"city_id"),
    Area(6,"area_id");

    private Integer key;

    private String vaule;

    GovernmentTypeEnumUtil(Integer key, String vaule) {
        this.key = key;
        this.vaule = vaule;
    }

    public Integer getKey() {
        return key;
    }

    public void setKey(Integer key) {
        this.key = key;
    }

    public String getVaule() {
        return vaule;
    }

    public void setVaule(String vaule) {
        this.vaule = vaule;
    }

    public static String getVaule(Integer key){
        GovernmentTypeEnumUtil[] vaules =  GovernmentTypeEnumUtil.values();
        for(GovernmentTypeEnumUtil index :vaules){
            if(index.getKey() == key){
                return index.getVaule();
            }
        }
        return null;
    }
}
